package com.ruoyi.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 设备保养计划管理对象 maintenance_plans
 *
 * @author ruoyi
 * @date 2025-03-19
 */
public class MaintenancePlans extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 保养计划唯一标识
     */
    private Long planId;

    /**
     * 保养计划编号
     */
    @Excel(name = "保养计划编号")
    private String planCode;

    /**
     * 设备编号
     */
    @Excel(name = "设备编号")
    private String equipmentNo;

    /**
     * 设备名称
     */
    @Excel(name = "设备名称")
    private String equipmentName;

    /**
     * 保养具体操作内容
     */
    @Excel(name = "保养具体操作内容")
    private String maintenanceContent;

    /**
     * 保养周期（如：一周一次、一月一次、一季度一次）
     */
    @Excel(name = "保养周期", readConverterExp = "如=：一周一次、一月一次、一季度一次")
    private String maintenanceCycle;

    /**
     * 上次保养执行时间
     */
    @Excel(name = "上次保养执行时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date lastMaintenanceTime;

    /**
     * 距离下次保养剩余天数
     */
    @Excel(name = "距离下次保养剩余天数")
    private Long daysUntilNext;

    public void setPlanId(Long planId) {
        this.planId = planId;
    }

    public Long getPlanId() {
        return planId;
    }

    public void setPlanCode(String planCode) {
        this.planCode = planCode;
    }

    public String getPlanCode() {
        return planCode;
    }

    public void setEquipmentNo(String equipmentNo) {
        this.equipmentNo = equipmentNo;
    }

    public String getEquipmentNo() {
        return equipmentNo;
    }

    public void setEquipmentName(String equipmentName) {
        this.equipmentName = equipmentName;
    }

    public String getEquipmentName() {
        return equipmentName;
    }

    public void setMaintenanceContent(String maintenanceContent) {
        this.maintenanceContent = maintenanceContent;
    }

    public String getMaintenanceContent() {
        return maintenanceContent;
    }

    public void setMaintenanceCycle(String maintenanceCycle) {
        this.maintenanceCycle = maintenanceCycle;
    }

    public String getMaintenanceCycle() {
        return maintenanceCycle;
    }

    public void setLastMaintenanceTime(Date lastMaintenanceTime) {
        this.lastMaintenanceTime = lastMaintenanceTime;
    }

    public Date getLastMaintenanceTime() {
        return lastMaintenanceTime;
    }

    public void setDaysUntilNext(Long daysUntilNext) {
        this.daysUntilNext = daysUntilNext;
    }

    public Long getDaysUntilNext() {
        return daysUntilNext;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("planId", getPlanId())
                .append("planCode", getPlanCode())
                .append("equipmentNo", getEquipmentNo())
                .append("equipmentName", getEquipmentName())
                .append("maintenanceContent", getMaintenanceContent())
                .append("maintenanceCycle", getMaintenanceCycle())
                .append("lastMaintenanceTime", getLastMaintenanceTime())
                .append("daysUntilNext", getDaysUntilNext())
                .append("remark", getRemark())
                .append("updateTime", getUpdateTime())
                .append("updateBy", getUpdateBy())
                .append("createTime", getCreateTime())
                .append("createBy", getCreateBy())
                .toString();
    }
}
